package com.rich.group;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

/**
 * @author minicoco
 * @version 1.0
 * @date 2021/8/16 10:24
 */
@SpringBootApplication(scanBasePackages = "com.rich")
@EnableDiscoveryClient
@EnableFeignClients
public class RichGroupBuyApplication {

    public static void main(String[] args) {
        SpringApplication.run(RichGroupBuyApplication.class,args);
    }

    @Bean
    public Redisson redisson(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://127.0.0.1:6379");
        return (Redisson) Redisson.create(config);
    }
}
